<html>
<head><meta charset="utf-8"><title>Solver caching · wg-traits · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/index.html">wg-traits</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Solver.20caching.html">Solver caching</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="184908472"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Solver%20caching/near/184908472" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Solver.20caching.html#184908472">(Jan 06 2020 at 14:08)</a>:</h4>
<p>At the moment, we use an untracted read when creating a salsa solver. That means that after every change (even a change in a comment), we re-create the solver. In the past week, we twice</p>



<a name="184908531"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Solver%20caching/near/184908531" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Solver.20caching.html#184908531">(Jan 06 2020 at 14:09)</a>:</h4>
<p>saw cases where caching the solver more aggressively would be benefitial. That is, we implemented an (unsound) caching which invalidated solver only if the set of top-level items changed, and it led to noticible perf improvements.</p>



<a name="184908586"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Solver%20caching/near/184908586" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Solver.20caching.html#184908586">(Jan 06 2020 at 14:10)</a>:</h4>
<p>I wonder what is our long-term plan here?</p>



<a name="184908646"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Solver%20caching/near/184908646" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Solver.20caching.html#184908646">(Jan 06 2020 at 14:11)</a>:</h4>
<p>See <a href="#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/Completion.20latency.3F/near/184906243" title="#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/Completion.20latency.3F/near/184906243">https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/Completion.20latency.3F/near/184906243</a> for the recent example where adding cache speeds up completion a bunch</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>